<?php
/**
 * 分类表
 * Created by ymk
 * User: Administrator
 * Date: 2018/6/20
 * Time: 14:02
 */

namespace MeetUp\Model;


use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Category extends Base
{
    use SoftDeletes;
    protected $table = 'category';

    public $primaryKey = 'category_id';

    protected $dates = ['deleted_at'];
    //允许批量操作的字段
    protected $fillable=['category_id','category_name','category_thumimg','category_bigimg'];

    //具体分类下的分组
    public function group($id){
        return $this->where(['group_id'=>$id])->get();
    }
}